package board;

import java.util.List;

import board.*;
import board.Move.Direction;

public class Checkers {

	public static boolean solutionChecker(Board pBoard, String solution) {
		
		List<Cord> boxes = null, goals = null;
		
		for(char move : solution.toCharArray()) 
			if(pBoard.doMovePlayer(Direction.create(move)))
				break;
		
		boxes = pBoard.getBoxes();
		goals = pBoard.getGoals();
		
		boolean found = false;
		for(Cord c : boxes) {
			for(Cord g : goals){
				if(c.equals(g))
					found = true;
			}
			
			if(!found)
				return false;
		}
		return false;
	}
	
	
	
	
}
